-- kill_add_exp
-- created by zhuangsl
-- 击杀怪物增加获得经验增加装备等级

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,

    -- 施放技能触发触发
    trigger = function(who, prop, arg)
        if not FormulaM.invoke("IS_LIVING_TARGET", arg) then
            -- 不是有生命的敌人，直接返回
            return;
        end

        local classId = tonumber(prop[2]);

        if not EquipM.canUpgradeSpecialEquip(classId) then
            return;
        end

        BonusM.doBonus({9, classId, prop[3]}, "kill_add_exp");

        return prop[3];
    end,

    record = function(target, prop, path)
        return false;
    end
};